1Mount Allison University, New Brunswick, Canada
*corresponding author
Brackets minus after heading excludes heading from numbering. DAC was supported by the Canada Research Chairs. Lisa Barney offered support and resources throughout the project
File import functions read files into R objects, commonly data frames.
Formatted display of content from .md file on GitHub site. Upon knitr figures will be saved to ‘Figs/’
The cited items must be in the .bib file saved in the .Rproj folder; in this case RPackageCitations.bib, generated by exporting a library to .bib from Zotero. Upon export click the ‘Keep Updated’ button in the BetterBibTex menu. If new citations are added to Zotero they will be pushed through to update the exported .bib file in the .Rproj folder. [@bryanGooglesheets4AccessGoogle2021;@mcgowanGoogledriveInterfaceGoogle2020; @wickhamTidyverseEasilyInstall2017]
A text file of functions is a preliminary step towards a package, to re-use functions without re-pasting them.
Try to set all user-defined variables near top of .Rmd, in one place, to avoid or limit editing of downstream code. Assigning project-specific values to generic variables helps with re-use of code.
DataIn <- "XXXX"
TargetFile <- "YYYY"
Data in a Google Sheet is more generic than a project-specific .csv edited and saved locally and pushed to GitHub. The Google Sheet package interface can be tricky. Repeatedly reading from Google Drive can provoke a throttle from Google.
The Google account that contained the data-sheets was de-authorized. This allowed universal access to the raw data sheet.Then retrieve data sheet from where it’s stored on Google Drive.
#Instead of sending a token, Google Sheets4 will send an API key. This can be used to access public resources for which no Google sign-in is required.
googlesheets4::gs4_deauth()
#URL of the Google Sheet so that it is available to anyone
googlesheet_url <- "https://docs.google.com/spreadsheets/d/1VpTn7voQ0889RoEloQtZFyVJyPMIRbACklrrquOiC7c/edit?usp=sharing"
PhysChemL <- read_sheet(googlesheet_url, sheet = "PhysChemL")
PhysChemP <- read_sheet(googlesheet_url, sheet = "PhysChemP")
knitr::include_graphics(file.path("..", "Data", "RawData", "Method_Set_Up.png"))
(#fig:methods set up)Worm Composting Method Setup.
Figure 1: Vermicast system made from 2L pop bottle which was put over top a petri dish to collect output from system.
Experiment groups: 1. Worms and apples 2. Worms, apples and dirt 3. Worms, apples and dirt one week before 4. Worms, apples and dirt one week after 5. Dirt and apples
(#fig:methods overall)Worm Composting Experiment Process.
Figure 2. Schematic of vermicast culturing process for worm pellet liquid output. Colony analysis of colonies using microscopy and gram-staining. Created using BioRender.com.
(#fig:plate examples)Figure 3. Example of cultured vermicast liquid for experimental groups 1-5, respectively.
PhysChemL |>
ggplot() +
geom_histogram(aes(Colony_Type), fill = "#7bbea5") +
facet_grid(rows = vars(Treatment)) +
theme_bw() +
labs(
title = "Colony Type Across Treatments in Compost Liquid"
)
Figure 4. Identification of colony types for vermicast liquid of experimental groups 1-4 from microscopy observations. The plot was created using R software.
Treatment 5 was an outlier, as it had a fungus covering most of the colonies, making them inaccessible. A secondary figures excluding it was created to better visualize the similarities and differences of bacterial colony biodiversity between treatments.
PhysChemL |>
filter(Treatment != 5) |>
ggplot() +
geom_histogram(aes(Colony_Type), fill = "#7bbea5") +
facet_grid(rows = vars(Treatment)) +
theme_bw() +
labs(
title = "Colony Type Across Treatments in Vermicast Liquid Output"
)
Figure 5.
PhysChemP |>
ggplot() +
geom_histogram(aes(Colony_Type),fill = "#ef926e" ) +
facet_grid(rows = vars(Treatment)) +
theme_bw() +
labs(
title = "Colony Types Across Treatments of Compost Pellet"
)
Figure 6.
The solid vermicast is the main product of a functioning vermicast system. These were also tested for the biodiversity between colonies. It was found there was little biodiversity of bacterial colonies between treatments.
# Combine two dataframe
PhysChem_combined <- bind_rows(
PhysChemP %>% mutate(Source = "Pellet"),
PhysChemL %>% mutate(Source = "Liquid")
)
# Plot the data
## scale_fill_brewer(palette = "______"): set color for the graph
## position = "dodge" : put the columns side-by-side
## binwidth = ____ : changing size of the columns
ggplot(PhysChem_combined) +
geom_histogram(aes(x = Colony_Type, fill = Source), position = "dodge", binwidth = 1) +
facet_grid(rows = vars(Treatment)) +
theme_bw() +
scale_fill_brewer(palette = "Set2") +
labs(
title = "Comparison of Colony Types between Compost Pellet and Liquid ",
x = "Colony_Type",
y = "Count",
fill = "Figure"
)
Figure 7. Identification of colony types for pellet and vermicast liquid of experimental groups 1-5 from microscopy observations. The plot was created using R software.
After the initial realization that there was less biodiversity in bacterial colonies between treatments than the liquid, it was determined to be beneficial to compare the results between treatments. This graphs supports that there is more biodiversity in colonies from the liquid of each treatment than from the solid vermicast. This suggests that the microbial biodiversity from vermicast systems is not deriving from the gut of the worm.
To further determine differences between bacteria types, microscopy was used. This helped to determine whether colonies that had similar appearance were actually the same bacteria through analysis of shape and gram-staining.
PhysChemL |>
ggplot() +
geom_histogram(aes(Size_um), fill = "#7bbea5") +
facet_grid(rows = vars(Treatment), cols = vars(Shape)) +
theme_bw() +
labs(
title = "Bacteria Size Across Different Shapes and Treatments in Compost Liquid"
)
Figure 8.
PhysChemL |>
filter(Treatment != 5) |>
ggplot() +
geom_histogram(aes(Shape), stat="count", fill = "#7bbea5") +
facet_grid(rows = vars(Treatment)) +
theme_bw()+
labs(
title = "Colony Shapes Across Treatments in Compost Liquid"
)
Figure 9.
##Analysis of the diffrent shapes and sizes of bacteria present in each treatment
PhysChemL |>
ggplot() +
geom_histogram(aes(Size_um),fill = "#7bbea5") +
facet_grid(rows = vars(Treatment), cols = vars(Shape)) +
theme_bw() +
labs(
title = "Bacteria Size Across Different Shapes and Treatments in Compost Liquid"
)
Figure 10.
PhysChemL |>
ggplot() +
geom_histogram(aes(Size_um),fill = "#7bbea5") +
facet_grid(rows = vars(Treatment)) +
theme_bw() +
labs(
title = "Colony Size Across Treatments in Compost Liquid"
)
Figure 11.
PhysChemL |>
ggplot() +
geom_histogram(aes(Plate_Colony),fill = "#7bbea5") +
facet_grid(rows = vars(Treatment)) +
theme_bw()
Figure 12.
This graph shows how many colonies were taken from each plate, and how many bacteria types were in each colony (liquid)
PhysChemL |>
ggplot() +
geom_histogram(aes(Gram),fill = "#7bbea5") +
facet_grid(rows = vars(Treatment), cols = vars(Shape)) +
theme_bw() +
labs(
title = "Colony Gram Across Treatments and Shapes in Compost Liquid "
)
Figure 13.
PhysChemL |>
ggplot() +
geom_histogram(aes(Gram),fill = "#7bbea5") +
facet_grid(rows = vars(Treatment)) +
theme_bw() +
labs(
title = "Colony Gram Across Treatments of Compost Pallet "
)
Figure 14.
## scale_x_continuous(breaks = c(a,b)) : in which set x-axis to display specific numbers value
PhysChemL |>
ggplot() +
geom_histogram(aes(Gram),fill = "#7bbea5", binwidth = 0.2) +
facet_grid(rows = vars(Treatment), cols = vars(Colony_Type)) +
scale_x_continuous(breaks = c(0, 1)) +
theme_bw()+
labs(
title = "Colony Gram Across Treatments and Colony Types of Compost Liquid"
)
Figure 15. Identification of gram staining (0 = negative, 1 =positive) for the different colony types for vermicast liquid of experimental groups 1-5. The plot was created using R software.
This graph shows us the different gram stains across colonies in the treatment types, which let us see if the colonies have consistent gram types across treatments. If they don’t, they were likely different colonies.
(#fig:gram stain examples)Figure 16. Examples of gram stains from treatment groups 1-5. Includes two from treatment group 4, demonstrating contrasting results between colonies of the same treatment group.
This next section is looking at the biodiversity of the worm pellets. (PhysChem2) We overall have less information for this, but putting the graphs side by side during a presentation could be helpful
Colony type per treatment is really the only thing we can do here, see data dictionary for description
# add , fill = "#7bbea5" if want color
PhysChemP |>
ggplot() +
geom_histogram(aes(Colony_Type), fill = "#ef926e") +
facet_grid(rows = vars(Treatment)) +
theme_bw() +
labs(
title = "Colony Types Across Treatments of Compost Pellet"
)
Figure 17.